
package com.ddyx.service.product.api.feign.fallback;

import com.ddyx.service.product.api.entity.Goods;
import com.ddyx.service.product.api.feign.RemoteProductClient;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * Feign失败配置
 */
@Slf4j
@Component
public class RemoteProductClientFallback implements RemoteProductClient {

	@Setter
	private Throwable cause;

	@Override
	public Goods ProductInfo(Integer productId) {
		log.error("feign 查询商品信息失败:{}", productId, cause);
		return null;
	}
}
